// @ts-ignore

// const proxy = require('http-proxy-middleware');
const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
  app.use(createProxyMiddleware('/api', { 
       target: 'http://api.qingyunke.com/api.php' ,
       secure: false,
       changeOrigin: true,
      //  pathRewrite: {
      //   "^/souche/api": "/"
      //  }
    }));
};